package util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;

public class TesteHora {


	public static void main(String[] args) {
		
		Date hoje = new Date(); 
		//1
		System.out.println("1-"+hoje);
		
		SimpleDateFormat formato = new SimpleDateFormat("EEEE, dd 'de' MMMM 'de' yyyy 'HORA:'hh:mm"); 
		SimpleDateFormat formato2 = new SimpleDateFormat("dd'/'MM'/'yyyy, HH:mm'h'");
		//2
		System.out.println ("2-"+formato.format(hoje));
		
		DateFormat df4 = DateFormat.getDateInstance(DateFormat.FULL); 
		//4
		System.out.println("4-"+df4.format(hoje));

		GregorianCalendar day = new GregorianCalendar(2007,0,3,23,00); 
		Date d = day.getTime();
		//5
		System.out.println("5-"+formato.format(d));
		System.out.println("6-"+formato2.format(d));

		GregorianCalendar teste1 = new GregorianCalendar(2007,0,2,22,59);
		//Date dteste1 = teste1.getTime();
		//GregorianCalendar teste1 = new GregorianCalendar();
		
		double e=day.getTimeInMillis()/1000/60/60;
		double f=teste1.getTimeInMillis()/1000/60/60;
		System.out.println(e);
		System.out.println(f);
		System.out.println((e-f));

	}
	
	
}
